<?php 
	class Db_log extends CI_Model{
		
		public function __construct(){
			parent::__construct();
		}
		
		public function logs(){
			$ip = $_SERVER['REMOTE_ADDR'];
			$ar = array(
						'username'=>$this->session->userdata('sess_username'),
						'ipaddress'=>$ip,
						'department_pkid'=>$this->session->userdata('sess_dp'),
					 	'login_date'=>date('Y-m-d H:i:s')
					);
			$this->db->insert('mobile_user_log',$ar);
			return true;
		}
	}
?>